<template>
  <div>
    <el-tabs v-model="activeName" class="demo-tabs" tabPosition="left">
      <el-tab-pane v-for="(item, index) in tabs" :key="index" :label="item.label" :name="item.name">
      </el-tab-pane>
      <component :is="whichComm[activeName]" :actionBtn="false" :searchConfig="false" :isWithAuth="0" :auth="hideAuthBtn"></component>
    </el-tabs>
  </div>
</template>

<script setup lang="ts">

import NursingRecord from "@/views/datacenter/business/insteServer/NursingRecord/index.vue";
import OldmanClock from "@/views/datacenter/business/insteServer/ClockRecord/index.vue";
import HospitalRecord from "@/views/datacenter/business/insteServer/HospitalRecord/index.vue";
import CheckoutRecord from "@/views/datacenter/business/insteServer/CheckoutRecord/index.vue";
import admissionManagement from '@/views/elderlyInstitute/admissionManagement/index.vue'

const activeName = ref("OldmanClock");
const tabs = [
  { label: "打卡记录", name: "OldmanClock" },
  { label: "在院记录", name: "admissionManagement" },
  { label: "退院记录", name: "CheckoutRecord" },
  { label: "护理服务记录", name: "NursingRecord" },
];

const hideAuthBtn = {
  add: 'hide',
  edit: 'hide',
  delete: 'hide',
  HandleForm: 'hide',
  spotCheck: 'hide',
  resultOkBtn: 'hide',
  resultNoBtn: 'hide',
  checkOut: 'hide',
	leave: 'hide',
}
const whichComm = {
  NursingRecord,
  OldmanClock,
  HospitalRecord,
  CheckoutRecord,
  admissionManagement
};

</script>

<style scoped></style>